#ifndef TCP_H
#define TCP_H

#include <QObject>
#include <QTcpServer> //监听套接字
#include <QTcpSocket> //通信套接字
#include <QHostAddress>
class TCP : public QObject
{
    Q_OBJECT
public:
    explicit TCP(QObject *parent = nullptr);
    void Send(QString str);
    QString getPort();
    void setPort(QString port);

signals:

public slots:
protected:
    QTcpServer *tcpServe=nullptr;
    QTcpSocket *tcpSocket=nullptr;
private:
    QString port;
};

#endif // TCP_H
